﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Classes_introduce
{
    class Program
    {
        static void Main(string[] args)
        {
           
            
            List <Students> student = new List<Students>();
            string choice = "";
            do
            {
                Console.WriteLine("Would you like to add students to the list? Y/N");
                choice = Console.ReadLine();
                if (choice == "Y")
                {
                    Console.WriteLine("Enter the info for students: ");
                    Students firstStudent = new Students();
                    firstStudent.AddStudentsInfo();
                    firstStudent.AllMarks();
                    //firstStudent.StudentInfo();
                    student.Add(firstStudent);
                }
            } while (choice == "Y");

            foreach (var result in student)
            {
                if( result.avarageOfAllMarks()> 67)
                {
                    result.StudentInfo();
                }
            }
        }
    }
}

